class CustomPageTest extends React.Component {
    constructor(props){
        super(props);
        this.state = {
            token : ''
        }
    }

    componentDidMount(){
        postJson("/api/custom/syn_data/getWebApiToken?customId=jhylf14988&commName=测试小区10",null,(data)=>{
            this.initialized = true;
            this.setState({token:data.data});
        })
    }

    render(){
        if(this.initialized)
        return (
            <div>
                设备在线列表:
                <iframe height={800} width="100%" src={"/api/custom/web/queryOnlineDevices?webApiToken="+this.state.token}/>
                发卡页面:
                <iframe height={800} width="100%" src={"/api/custom/web/addCard?webApiToken="+this.state.token}/>
                卡列表页面:
                <iframe height={800} width="100%" src={"/api/custom/web/queryCard?webApiToken="+this.state.token}/>
                梯口机发广告页面:
                <iframe height={800} width="100%" src={"/api/custom/web/outdoorImageAds?webApiToken="+this.state.token}/>
            </div>
        )
        else
            return ''
    }

}

ReactDOM.render(<CustomPageTest/>,document.getElementById("customPageTest"));